package com.zyl.eventlistener.demos.web;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author zyl
 * @description
 * @since 2024/7/10
 */
@Slf4j
@Component
public class RegisterEventListener {

    @EventListener
    public void handleNotifyEvent(RegisterSuccessEvent event) {
        log.info("监听到用户注册成功事件：" +
                "{}，测试成功", event.getUserName());
    }

    @EventListener
    public void handleNotifyEvent1(RegisterSuccessEvent event) {
        log.info("监听到用户注册成功事件1：" +
                "{}，测试成功", event.getUserName());
    }

}

